<?php
    header('content-type:test/html;charset=utf-8');


    // 将dbconn.php添加到本页面
    include('./../dbconn.php');

    //  $_GET[]获取客户端以get方式发送的请求
    $userName = $_GET["userName"];
    $tel = $_GET["tel"];
    $password = $_GET["password"];
    $sex = $_GET["sex"];
    $age = $_GET["age"];

    $sql = "insert into member (userName, tel, password, sex, age) values('$userName', '$tel', '$password', '$sex', '$age')";

    if($conn->query($sql)){
        echo '插入成功';
    }else{
        echo '插入失败';
    }

    // echo "$userName $tel $password $sex $age";
?>